package com.xuecheng.content.api;

import com.xuecheng.commons.model.vo.CoursePubVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.TeachplanMediaDataVo;
import com.xuecheng.commons.model.vo.TeachplanVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * feign接口，调用绑定表
 */
@FeignClient("xc-content-service")
public interface ContentClient {

    @GetMapping("/teachplanMedia/{mediaId}")
    ResponseResult<TeachplanMediaDataVo> findTmByMediaId(@PathVariable Long mediaId);

    @GetMapping("/coursePub/findAll")
    ResponseResult<List<CoursePubVo>> findAll();

    @GetMapping("/coursePub/{id}")
    ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);

    @GetMapping("/teachplan/{teachplanId}")
    public ResponseResult<TeachplanVo> findTeachplanById(@PathVariable("teachplanId") Long teachplanId);
}
